home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.cbm
- Path: novice.uwaterloo.ca!dfevans
- From: dfevans@bbcr.uwaterloo.ca (David Evans)
- Subject: Re: Various Commodore Computers (please read)
- Sender: news@novice.uwaterloo.ca (Mr. News)
- Message-ID: <DKpv30.HHJ@novice.uwaterloo.ca>
- Date: Fri, 5 Jan 1996 16:28:12 GMT
- References: <4cbf66$hem@wn1.sci.kun.nl> <30e9b7a3.185sn@fch.wimsey.bc.ca>
- Nntp-Posting-Host: bcr.uwaterloo.ca
- Organization: University of Waterloo
-
- In article <30e9b7a3.185sn@fch.wimsey.bc.ca>,
- Dan Fandrich <dan@fch.wimsey.bc.ca> wrote:
- >In article <4cbf66$hem@wn1.sci.kun.nl> rhialto@mbfys.kun.nl writes:
- >>There was apparently a program published that reliably demonstrated the
- >>bug (even though it took a while). I'd like to see that program and
- >>the related article (Transactor?).
- >
- >The October 1985 Compute! (Vol.7,No.10) contains a program which
- >demonstrates the bug, and the September 1986 Transactor (Vol.7,Iss.2)
- >discusses the causes (at the assembly language level) and provides code to
- >fix that bug and several others in the ROM.
- >
-
- That's it. The bug basically went like this, although I'm sure I've left
- some things out:
- Buffers are reserved for the BAM from drives 0 and 1 and the BAMs are read
- in. Obviously the one for drive 1 gets an error (drive not ready, likely.) As
- things go along, buffers are moved about; SWAPBUF is called to swap the
- contents of two buffers if required and STLBUF is called to "steal" a buffer
- that is marked used but is no longer needed. Two tracks-worth of the BAM is
- copied from its buffer to somehwere in zero page (as I recall) in order to ease
- work with it. If buffer space becomes tight, STLBUF will be called. However,
- STLBUF will never steal a buffer which incurred an error. Thus, the buffer
- holding the phantom drive 1 BAM will never be stolen.
- Under certain circumstances, the buffer holding the drive 0 BAM will be
- stolen by STLBUF. Once the drive has finished with its "image" of the BAM in
- zero page, it realises it doesn't have the BAM elsewhere and reads it back in
- from track 18 sector 0. This BAM is then updated with the BAM images, another
- two tracks of BAM is transferred to the image locations, and things continue.
- The bug strikes if the BAM in the stolen buffer was dirty when it was stolen;
- blocks allocated for the newely-save@'d file will no longer be allocated, and
- may be clobbered at any time.
- Phillip A. Slaymaker was the guy who wrote the articles in The T. and
- Compute! He suggested several modifications, including modifying STLBUF to
- never steal the drive 0 BAM, modifying STLBUF to be able to steal a buffer with
- a "drive not ready" error, and adding aditional buffer space to the drive.
- I know there's more, but I can't remember it all. :-)
-
- --
- David Evans (NeXTMail OK) dfevans@bbcr.uwaterloo.ca
- Computer/Synth Junkie http://bbcr.uwaterloo.ca/~dfevans/
- University of Waterloo "Default is the value selected by the composer
- Ontario, Canada overridden by your command." - Roland TR-707 Manual
-